import axios from 'axios';

const service = axios.create({
  baseURL: 'https://e-commerce.kaikeba.com/shop-api',
  timeout: 5000,
});

service.interceptors.response.use(
  (res) => {
    // console.log('res', res);
    if (res.status === 200) {
      return res.data;
    }
    return res;
  },
  (error) => error.message,
);
export default service;
